package com.hycreate.platform.modules.pointunit;

import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hycreate.platform.common.persistence.DataEntity;

/**
 * 积分记录Entity
 * @author 王
 * @version 2017-11-29
 */
public class YhcgPointunit extends DataEntity<YhcgPointunit> {
	
	private static final long serialVersionUID = 1L;
	private String unitid;		// 单位id
	private Date unittime;		// 扣分时间
	private String unitdelay;		// 扣分原因
	private String uid;		// 扣分工单id
	private String fractionpoint;		// 扣分分数
	
	public YhcgPointunit() {
		super();
	}

	public YhcgPointunit(String id){
		super(id);
	}

	@Length(min=0, max=36, message="单位id长度必须介于 0 和 36 之间")
	public String getUnitid() {
		return unitid;
	}

	public void setUnitid(String unitid) {
		this.unitid = unitid;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getUnittime() {
		return unittime;
	}

	public void setUnittime(Date unittime) {
		this.unittime = unittime;
	}
	
	public String getUnitdelay() {
		return unitdelay;
	}

	public void setUnitdelay(String unitdelay) {
		this.unitdelay = unitdelay;
	}
	
	@Length(min=0, max=36, message="扣分工单id长度必须介于 0 和 36 之间")
	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}
	
	@Length(min=0, max=255, message="扣分分数长度必须介于 0 和 255 之间")
	public String getFractionpoint() {
		return fractionpoint;
	}

	public void setFractionpoint(String fractionpoint) {
		this.fractionpoint = fractionpoint;
	}
	
}